home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / fun / delspaces < prev    next >
Encoding:
Text File  |  1996-09-27  |  710 b   |  28 lines

  1. ;OCL{{{}}}
  2. ;OCL{{{  comments
  3. ; delete all spaces from cursor to next non-space-char or end-of-line.
  4. ;OCL}}}
  5. @if-using not(ocl-file-delspaces)
  6.   @use (ocl-file-delspaces)
  7.   ;OCL{{{  libs
  8.   @if-using not(ocl-file-delchar) @lib delchar @fi
  9.   ;OCL}}}
  10.   ;OCL{{{  delspaces
  11.   ( deffun delspaces
  12.      ( if in-prompt ( return-from-macro ) fi
  13.        if last-message M_ERR_PO () fi
  14.        "  ;
  15.        while and(last-message M_ERR_PO not(test-begin-line))
  16.         ( forward-character
  17.           "  ;
  18.         )
  19.        delete-previous-character
  20.        while and(test-char-set blank not(test-end-line))
  21.         ( delete-character
  22.           if last-message M_ERR_PO ( forward-character ) fi
  23.         )
  24.      )
  25.   )
  26.   ;OCL}}}
  27. @fi
  28.